<?php

namespace App\Logics;


use App\Models\User;
use App\Models\UserModify;


class UserLogic extends Logic
{


    // 查找
    public function info($myUser)
    {
        $model = new User();
        $where = ['id' => $myUser['id']];
        $info  = $model->oneFind($where);
        if($info === false){
            return $this->_returnFail($model->getError());
        }
        if(empty($info)){
            //return $this->_returnFail('你要查看的用户不存在！');
            return $this->_returnFail('user_has_no_exist');
        }

        // 整理
        $info = $info->toArray();


        return $info;
    }


}


